|
SAP Convergent Charging
Java and XML APIs (BART) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.highdeal.bart.hci.CDRModel
public class CDRModel
A Consumption Detail Record (CDR) represents a customer service usage; This information data record includes the characteristics of the service consumption.
Note
In Telecommunications Industry, a CDR stands for Call Detail Record. It relates to a telephone call.
Each CDR stored in the BART Database has a:
The original CDR includes the following information:
The CDR data model defines the content of a consumption detail record in SAP CC BART Server and its back-end database (see the CDR table). CDR models keep dialing data such as consumption date and user accesses in database in order to batch charge them on SAP CC systems. CDRs are linked through all 3 BART processes: offline acquisition process, consolidation process and batch charging process. Besides CDRs data, each CDR has a status that evolves during these processes.
STATUS_NEW
STATUS_ERROR
STATUS_RATED
STATUS_DUPLICATE
STATUS_IGNORED
STATUS_TO_BE_RERATED
STATUS_NO_PROVISIONING
STATUS_ONLINE_SUBSCRIPTION
Refer to the SAP CC BART Error Code Reference documentation for detailed information about codes resulting from the batch charging processing. This reference documentation provides action plans to resolve the issues during the batch charging operations.
You develop the initial conversion of the transactional data available in your offline mediation system to the CDR format that SAP CC BART Server can manage during the acquisition process.
In your client application or system, you must set up the following CDR fields with the relevant dialing data:
You implement
the CDRModel(..) constructor.
CDR is then inserted in the SAP CC BART database, waiting for business operations: modification, batch charging.
See AcquisitionSessionModel for information about the acquisition process.
During the acquisition process, a consolidation process is done
The consolidation process tries to fetch CDR's subscription information usable for the rating process. It
fills the following fields:
STATUS_NEW.
-1". In those both cases, a manual consolidation
is needed before to rate those CDRs. Use the SAP CC BART Tool user interface.
STATUS_NEW or STATUS_ERROR
Following fields will be updated during this process:
STATUS_RATED. When a batch charging (rating) error occured, the status becomes
STATUS_ERROR and the following fields will be filled:
RatingSessionModel for information about rating process.
Note
Refer to SAP CC Library (Application Help) documentation for more information about the features and processes in SAP Convergent Charging.
CDRs selected for rerating have the status STATUS_TO_BE_RERATED.
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="cdr">
<xs:complexType>
<xs:sequence>
<xs:element ref="ci" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="cdrID" type="xs:string"/>
<xs:attribute name="batchRatingGroupId" type="xs:int"/>
<xs:attribute name="userID" type="xs:string" use="required"/>
<xs:attribute name="serviceID" type="xs:string" use="required"/>
<xs:attribute name="subscriptionID" type="xs:string"/>
<xs:attribute name="consumptionDate" type="xs:dateTime" use="required"/>
<xs:attribute name="status" type="cdrStatusType"/>
<xs:attribute name="acquisitionDate" type="xs:dateTime"/>
<xs:attribute name="acquisitionID" type="xs:string"/>
<xs:attribute name="ratingDate" type="xs:dateTime"/>
<xs:attribute name="ratingID" type="xs:string"/>
<xs:attribute name="errorCode" type="xs:string"/>
<xs:attribute name="errorDescription" type="xs:string"/>
<xs:attribute name="source" type="xs:string"/>
<xs:attribute name="magicNumber" type="xs:string"/>
<xs:attribute name="snapshotID" type="xs:int"/>
</xs:complexType>
</xs:element><xs:simpleType name="cdrStatusType">
<xs:restriction base="xs:string">
<xs:enumeration value="new"/>
<xs:enumeration value="error"/>
<xs:enumeration value="rated"/>
<xs:enumeration value="duplicate"/>
<xs:enumeration value="ignored"/>
<xs:enumeration value="to_be_rerated"/>
<xs:enumeration value="no_provisioning"/>
<xs:enumeration value="online_subscription"/>
</xs:restriction>
</xs:simpleType>
| Field Summary | |
|---|---|
static int |
BRGRP_NO_PROVISIONING
INTERNAL USE ONLY - Reserved for internal used |
static int |
BRGRP_ONLINE_SUBSCRIPTION
INTERNAL USE ONLY - Reserved for internal used |
static int |
NO_SUBSCRIPTION
INTERNAL USE ONLY - Reserved for internal used |
static int |
STATUS_DUPLICATE
3: This CDR status indicates that the CDR is a duplicate |
static int |
STATUS_ERROR
1: This CDR status indicates that an attempt of batch charging (rating) has been done but an error occured in the SAP Core Server system; See the numerical error code with the getErrorCode() method. |
static int |
STATUS_IGNORED
4: This CDR status indicates that the CDR will be ignored by the next rating session. |
static int |
STATUS_NEW
0: This CDR status indicates that the CDR has been correctly acquired and consolidated. |
static int |
STATUS_NO_PROVISIONING
7: This CDR status indicates that the CDR has been acquired but not consolidated |
static int |
STATUS_ONLINE_SUBSCRIPTION
8: This CDR status indicates that the CDR is linked to an online subscription and not a offline one |
static int |
STATUS_RATED
2: This CDR status indicates that the CDR has been successfully rated and charged by the SAP Core Server system responsible for processing the batch charging operations requested by the SAP CC BART Server system |
static int |
STATUS_RATING_IN_PROGRESS
Deprecated. - Not use since Highdeal BART Release 1.2 software version - Revoked since version 1.0 of SAP CC |
static int |
STATUS_TO_BE_RERATED
6: This CDR status indicates that the CDR is selected to be rerated through SAP CC rerating operation |
static java.lang.String |
TAG_NAME
The XML tag name of this data model: "cdr" |
| Constructor Summary | |
|---|---|
CDRModel()
Builds an empty CDR model |
|
CDRModel(com.highdeal.pnr.hci.ChargeableItem item,
java.lang.String userID,
java.lang.String serviceID,
java.util.Date consumptionDate,
java.lang.String source)
Builds a CDR with a chargeable item (see here), source, and access information; This constructor should be used to implement the acquisition process in your client application via the Message TCP technical interface (see the AcquireCDROp class)
or the HTTP Communication Interface (HCI) technical interface (see the CDRServiceClient class). |
|
CDRModel(java.lang.Long OID,
com.highdeal.pnr.hci.ChargeableItem item,
java.lang.String userID,
java.lang.String serviceID,
java.lang.Integer batchRatingGroupId,
java.lang.Long subscriptionID,
java.lang.Short partitionID,
java.lang.Long chargeID,
java.util.Date consumptionDate,
int status)
INTERNAL USE ONLY - Builds a CDR model with rating information. |
|
CDRModel(java.lang.Long OID,
java.lang.Integer batchRatingGroupId,
com.highdeal.pnr.hci.ChargeableItem item,
java.lang.String userID,
java.lang.String serviceID,
java.lang.Long subscriptionID,
java.lang.Short partitionID,
java.lang.Long chargeID,
java.util.Date consumptionDate,
java.util.Date acquisitionDate,
java.util.Date ratingDate,
int errorCode,
java.lang.String errorDescription,
int status,
java.lang.Long acquisitionID,
java.lang.Long ratingID,
java.lang.String source,
java.lang.String magicNumber)
INTERNAL USE ONLY - Builds a CDR model with full information. |
|
| Method Summary | |
|---|---|
com.highdeal.pnr.hci.AccessibleChargeType |
_getAccessibleChargeType()
|
java.lang.String |
_getDatabaseMagicNumber()
|
java.lang.Long |
_getOID()
Gets the CDR model identifier. |
int |
_getOriginalErrorCode()
|
java.lang.String |
_getOriginalErrorDescription()
|
int |
_getOriginalStatus()
|
void |
_setAccessibleChargeType(com.highdeal.pnr.hci.AccessibleChargeType accessibleChargeType)
|
void |
_setAcquisitionDate(java.util.Date acqDate)
Sets the acquisition date of the CDR model. |
void |
_setAcquisitionID(java.lang.Long acqID)
Sets the acquisition session identifier. |
void |
_setBatchRatingGroupId(java.lang.Integer bgrp)
Sets the batch rating group identifier |
void |
_setCompareKey(java.lang.Long compareKey)
|
void |
_setErrorCode(int ratingError)
SAP CC BART Server sets up the error code received from SAP CC Core Server. |
void |
_setErrorDescription(java.lang.String description)
SAP CC BART Server sets up the error description. |
void |
_setMagicNumber(java.lang.String mNumber)
Sets the magic number of the CDR model. |
void |
_setOID(java.lang.Long oid)
Sets the CDR model identifier. |
void |
_setOriginalErrorCode(int ratingError)
|
void |
_setOriginalErrorDescription(java.lang.String description)
|
void |
_setRatingDate(java.util.Date ratDate)
Sets the CDR model rating date. |
void |
_setRatingID(java.lang.Long ratID)
Sets the rating session identifier. |
void |
_setSnapshotID(int snapshotID)
Sets the snapshot identifier used to rate event. |
void |
_setStatus(int s)
Sets the CDR status. |
void |
_setSubscriptionID(java.lang.Long subID)
Sets the subscription identifier. |
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element. |
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the object, the child representing
the marshallable object which must be added to the element. |
protected java.lang.Long |
compareKey()
|
int |
compareTo(CDRModel that)
|
CDRModel |
duplicate()
Duplicates a CDR model; The result is a new object with same values, even the CDR ID. |
java.lang.String |
get32MagicNumber()
Gets the magic number of the CDR model. |
java.util.Date |
getAcquisitionDate()
Gets the acquisition date of the CDR model. |
java.lang.Long |
getAcquisitionID()
Gets the acquisition session identifier. |
java.lang.Integer |
getBatchRatingGroupId()
Gets the batch rating group identifier. |
com.highdeal.pnr.hci.ChargeableItem |
getChargeableItem()
Gets the chargeable item of the CDR model. |
java.lang.Long |
getChargeID()
Gets the charge identifier. |
java.util.Date |
getConsumptionDate()
Gets the consumption date of the CDR model. |
int |
getErrorCode()
Gets the error code. |
java.lang.String |
getErrorDescription()
Gets the error description. |
java.lang.String |
getMagicNumber()
Gets the magic number of the CDR model. |
java.lang.String |
getName()
Gets the CDR name. |
java.lang.Short |
getPartitionID()
Gets the partition identifier. |
java.util.Date |
getRatingDate()
Gets CDR model rating date. |
java.lang.Long |
getRatingID()
Gets the rating session identifier. |
java.lang.String |
getServiceID()
Gets the technical ID of the customer service. |
int |
getSnapshotID()
Gets the snapshot identifier used to rate event. |
java.lang.String |
getSource()
Gets the CDR source. |
int |
getStatus()
Gets the CDR status. |
java.lang.Long |
getSubscriptionID()
Gets the subscription identifier. |
java.lang.String |
getUserID()
Gets the user ID. |
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children. |
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being processed. |
void |
setCDRIgnored()
Sets the CDR to the status "ignored". |
void |
setCDRNew()
Sets the CDR to the status "new". |
void |
setChargeableItem(com.highdeal.pnr.hci.ChargeableItem item)
Sets the chargeable item of the CDR model. |
void |
setChargeID(java.lang.Long chargeID)
Sets the charge identifier. |
void |
setConsumptionDate(java.util.Date consumptionDate)
Sets the consumption date of the CDR model. |
void |
setName(java.lang.String name)
Sets CDR name by setting item name |
void |
setPartitionID(java.lang.Short partitionID)
Sets the partition identifier. |
void |
setServiceID(java.lang.String serviceID)
Sets the service ID. |
void |
setSource(java.lang.String source)
Sets the CDR source. |
void |
setUserID(java.lang.String userID)
Sets the user ID. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int STATUS_NEW
public static final int STATUS_ERROR
getErrorCode() method.
public static final int STATUS_RATED
public static final int STATUS_DUPLICATE
public static final int STATUS_IGNORED
public static final int STATUS_TO_BE_RERATED
public static final int STATUS_NO_PROVISIONING
public static final int STATUS_ONLINE_SUBSCRIPTION
public static final int BRGRP_ONLINE_SUBSCRIPTION
public static final int BRGRP_NO_PROVISIONING
public static final int NO_SUBSCRIPTION
@Deprecated public static final int STATUS_RATING_IN_PROGRESS
public static final java.lang.String TAG_NAME
| Constructor Detail |
|---|
public CDRModel()
public CDRModel(com.highdeal.pnr.hci.ChargeableItem item,
java.lang.String userID,
java.lang.String serviceID,
java.util.Date consumptionDate,
java.lang.String source)
AcquireCDROp class)
or the HTTP Communication Interface (HCI) technical interface (see the CDRServiceClient class).
item - The chargeable itemuserID - The user service ID (USID) - a technical key that identifies the end customer of the serviceserviceID - The customer service ID (SID) - a technical key that identifies the customer service or a subserviceconsumptionDate - The service usage datesource - The source information (network element identifier, ...)AcquireCDROp,
CDRServiceClient
public CDRModel(java.lang.Long OID,
java.lang.Integer batchRatingGroupId,
com.highdeal.pnr.hci.ChargeableItem item,
java.lang.String userID,
java.lang.String serviceID,
java.lang.Long subscriptionID,
java.lang.Short partitionID,
java.lang.Long chargeID,
java.util.Date consumptionDate,
java.util.Date acquisitionDate,
java.util.Date ratingDate,
int errorCode,
java.lang.String errorDescription,
int status,
java.lang.Long acquisitionID,
java.lang.Long ratingID,
java.lang.String source,
java.lang.String magicNumber)
item - userID - serviceID - consumptionDate - source -
public CDRModel(java.lang.Long OID,
com.highdeal.pnr.hci.ChargeableItem item,
java.lang.String userID,
java.lang.String serviceID,
java.lang.Integer batchRatingGroupId,
java.lang.Long subscriptionID,
java.lang.Short partitionID,
java.lang.Long chargeID,
java.util.Date consumptionDate,
int status)
item - userID - serviceID - consumptionDate - | Method Detail |
|---|
public CDRModel duplicate()
public void setCDRIgnored()
public void setCDRNew()
public java.util.Date getAcquisitionDate()
public void _setAcquisitionDate(java.util.Date acqDate)
acqDate - The acquisition datepublic java.lang.Long getAcquisitionID()
public void _setAcquisitionID(java.lang.Long acqID)
acqID - the acquisition session identifierpublic java.lang.Long getRatingID()
public void _setRatingID(java.lang.Long ratID)
ratID - the rating session identifierpublic java.util.Date getConsumptionDate()
public void setConsumptionDate(java.util.Date consumptionDate)
consumptionDate - the consumption date of the CDR modelpublic java.lang.Integer getBatchRatingGroupId()
public void _setBatchRatingGroupId(java.lang.Integer bgrp)
bgrp - the batch rating group identifierpublic java.lang.String getMagicNumber()
public java.lang.String get32MagicNumber()
public java.lang.String _getDatabaseMagicNumber()
public void _setMagicNumber(java.lang.String mNumber)
mNumber - the magic numberpublic java.lang.String getName()
public void setName(java.lang.String name)
name - new CDR nameChargeableItem.setName(String name)public com.highdeal.pnr.hci.ChargeableItem getChargeableItem()
public void setChargeableItem(com.highdeal.pnr.hci.ChargeableItem item)
item - the chargeable itempublic java.lang.Long _getOID()
public void _setOID(java.lang.Long oid)
oid - the CDR model identifierpublic java.util.Date getRatingDate()
public void _setRatingDate(java.util.Date ratDate)
ratDate - The rating datepublic int getErrorCode()
getErrorDescription()public int _getOriginalErrorCode()
public void _setErrorCode(int ratingError)
ratingError - The rating errorpublic void _setOriginalErrorCode(int ratingError)
public java.lang.String getErrorDescription()
public java.lang.String _getOriginalErrorDescription()
public void _setErrorDescription(java.lang.String description)
description - The error descriptionpublic void _setOriginalErrorDescription(java.lang.String description)
public java.lang.String getServiceID()
public void setServiceID(java.lang.String serviceID)
serviceID - The service IDpublic java.lang.String getSource()
public void setSource(java.lang.String source)
source - The CDR sourcepublic int getStatus()
public void _setStatus(int s)
s - The new statuspublic int _getOriginalStatus()
public java.lang.String getUserID()
public void setUserID(java.lang.String userID)
userID - The user IDpublic java.lang.Long getSubscriptionID()
public void _setSubscriptionID(java.lang.Long subID)
subID - The subscription identifierpublic java.lang.Short getPartitionID()
public void setPartitionID(java.lang.Short partitionID)
partitionID - The partition identifierpublic void _setSnapshotID(int snapshotID)
snapshotID - The snapshot identifier that uses format YYYYMMDDpublic int getSnapshotID()
public java.lang.Long getChargeID()
public void setChargeID(java.lang.Long chargeID)
chargeID - The charge identifierpublic java.lang.String toString()
toString in class java.lang.Objectpublic void setAttributes(XMLAttributes atts)
XMLMarshallable
setAttributes in interface XMLMarshallableatts - The XML attributes of the current element
public void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.
addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void addCharacterData(java.lang.String cData)
XMLMarshallable
addCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
XMLMarshallable
marshal in interface XMLMarshallableoutput - The XML output to marshal the object intopublic int compareTo(CDRModel that)
compareTo in interface java.lang.Comparable<CDRModel>protected java.lang.Long compareKey()
public void _setCompareKey(java.lang.Long compareKey)
public void _setAccessibleChargeType(com.highdeal.pnr.hci.AccessibleChargeType accessibleChargeType)
public com.highdeal.pnr.hci.AccessibleChargeType _getAccessibleChargeType()
|
Document Published: October 2015 (SAP CC 4.0 SP10 and Later) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||